<!DOCTYPE html>
<html>
    <head>
        <title></title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <load href="{$Think.const.CSS_URL}bootstrap.min.css" />
    <load href="{$Think.const.CSS_URL}bootstrap-theme.min.css" />
    <load href="{$Think.const.JS_URL}jquery-3.1.0.min.js" />
    <load href="{$Think.const.JS_URL}bootstrap.min.js" />
        <load href="{$Think.const.CSS_URL}jquery-confirm.css" />
        <load href="{$Think.const.JS_URL}jquery-confirm.min.js" />
    </head>
    <script>
        $(function(){
          $(".delete").click(function(){
              var ss=$(this);
              $.confirm({
                title: 'Logout?'+ss.index(".btn"),
                content: 'Your time is out, you will be automatically logged out in 10 seconds.',
                autoClose: 'confirm|10000',
                confirm: function(){
                        $.ajax({
                           type:"GET",
                           url:'{$Think.const.ADMIN_URL}article/del/id/'+ss.attr("value"),
                           success:function(msg){
                             window.location.reload()
                           }
                       });
    
                },
                cancel:function(){
                    return;
                }
            });
            
            
       });
      }) 
        </script>
    <body>
    <div class="container">
         <div class="page-header text-center">
            <h1>文章列表</h1>
          </div>
        <div>
            <a  class="btn btn-default btn-danger" href="{$Think.const.ADMIN_URL}article/del/clear/1" >删除所有</a>
             <table class="table table-bordered table-striped">
            <tr>
                <th>文章编号</th>
                <th>标题</th>
                <th>作者</th>
                <th>录入时间</th>
                <th>操作</th>
            </tr>
            <tbody>
                <volist name="list" id="vo">
                 <tr>
                <td>{$vo["id"]}</td>
                <td>{$vo["provider"]}</td>
                <td>{$vo["title"]}</td>
                <td>{$vo["datetime"]}</td>
                <td><button  class="btn btn-default btn-danger delete" value="{$vo['id']}">删除</button></td>
            </tr>
                </volist>
            </tbody>
        </table>
            <div class="h4 text-center">{$page}</div>
        </div>
       
    </div>
    </body>
</html>
